package com.arch.flink.biz.orderdemo;

import lombok.Data;

/**
 * @author pizhihui
 * @date 2020-12-12
 */
@Data
public class OrderAddressBean {

    private Long orderId;
    private String orderTime;
    private String address;


    public static OrderAddressBean string2OrderAddress(String line) {

        if (null == line || line.length() <= 0) {
            return null;
        }
        OrderAddressBean orderAddressBean = new OrderAddressBean();
        String[] split = line.split(",");
        orderAddressBean.setOrderId(Long.parseLong(split[0]));
        orderAddressBean.setOrderTime(split[1]);
        orderAddressBean.setAddress(split[2]);
        return orderAddressBean;
    }

}
